/**
 * <p>Title: com.cnpec.ims.dam.common.util.UpperUUIDHexGenerator.java</p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: univessence</p>
 */
package com.itump.base.util;

import java.io.Serializable;

import org.hibernate.engine.SessionImplementor;
import org.hibernate.id.UUIDHexGenerator;
/** 
 * <p>功能描述: 获取36位随即序号</p>
 * <p>创建时间：2010-07-15 19：25 </p>
 * <p>版本信息：1.0 </p>
 * <p>Copyright: Copyright (c) 2010</p>
 * <p>Company:</p>
 */
public class UpperUUIDHexGenerator extends UUIDHexGenerator {
	public Serializable generate(SessionImplementor cache, Object obj) {
		String uuid = super.generate(cache,obj).toString();		
		char [] c = uuid.toCharArray();		
		
		for (int i = 0; i < c.length; i++) {
			c[i] = Character.toUpperCase(c[i]);
		}
		return new String(c);
	}
}
